package com.atguigu.gmall.index.service;

import com.atguigu.gmall.common.bean.ResponseVo;
import com.atguigu.gmall.index.feign.GmallPmsClient;
import com.atguigu.gmall.pms.entity.CategoryEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author mahaijun
 * @version 1.0.0
 * @ClassName IndexService.java
 * @Description TODO
 * @createTime 2021年11月12日 20:47:00
 */
@Service
public class IndexService {
    @Autowired
    private GmallPmsClient gmallPmsClient;
    public List<CategoryEntity> queryLv1Cates() {
        ResponseVo<List<CategoryEntity>> listResponseVo = this.gmallPmsClient.queryCategoriesByPid(0L);
        return listResponseVo.getData();


    }

    public List<CategoryEntity> queryLv123CatesByPid(Long pid) {
        return null;
    }
}
